<link rel="stylesheet" type="text/css" href="css/layout_master_page.css" />
<link rel="stylesheet" type="text/css" href="css/layout.css" />
<link rel="stylesheet" type="text/css" href="css/controls.css" />
<div class="new-1-block-2-hearder">
	<div class="new-1-block-2-text">VĂN BẢN</div>
</div>
<div style="margin-left:5px; margin-right:5px;">
<p>
	Lĩnh vực :
	<select name="loai">
		<option  value="tat_ca">Tất cả</option>
		<option  value="tuyen_giao">Tuyên giáo</option>
		<option  value="to_chuc">Tổ chức</option>
		<option  value="kiem_tra">Kiểm tra</option>
		<option  value="van_phong">Văn phòng</option>
		<option  value="doan_tncshcm">Đoàn TNCS Hồ Chí Minh Dân Chính Đảng</option>
	</select>
	<input type="button" value="Tìm kiếm" name="tim_kiem" />
</p> 

<table width="100%" class="table-list">
	<tr class="table-header">
		<td width="90px">Số hiệu VB</td>
        <td width="70px">Ngày ban hành</td>
        <td width="70px">Ngày hiệu lực</td>
        <td>Trích yếu</td>
		<!--<td width="20">Xem</td>-->
		<td width="45">Tải về</td>
    </tr>
	
	<?php
		$exe_mysql = new execute_mysql_query();
		$result = $exe_mysql->execute("select id, id_cat, num, date_format(date_pub, '%d/%m%/%Y') as date_pub, date_format(date_eff, '%d/%m%/%Y') as date_eff, sub, link from document order by date_pub desc",0);
		while($row = mysql_fetch_array($result))
		{			
			@$filename = "document/".$row['link'];
			echo '<tr>';
				echo '<td align="center">'.$row['num'].'</td>';
				echo '<td align="center">'.$row['date_pub'].'</td>';
				echo '<td align="center">'.$row['date_eff'].'</td>';
				echo '<td>'.$row['sub'].'</td>';
				//echo '<td align="center">';
					//echo '<a href="">';
					//<iframe src="http://docs.google.com/gview?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>
						//echo '<img src="img/ico_view.png" alt="Xem" />';
					//echo '</a>';
				//echo '</td>';
				echo '<td align="center">'.'<a href="'.$filename.'">'.'<img src="img/Save-icon.png" alt="Tải về" />'.'</a>'.'</td>';
			echo '</tr>';
		}
	?>
</table>
</div>
